// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   WebOption.java

package com.vandagroup.common.util.web;


public class WebOption
{

    private String strValue;
    private String strContent;
    private boolean isSelect;

    public WebOption(String paValue, String paContent)
    {
        strValue = "";
        strContent = "";
        isSelect = false;
        if(paValue != null)
            strValue = paValue;
        if(paContent != null)
            strContent = paContent;
    }

    public WebOption(String paValue, String paContent, boolean paIsSelect)
    {
        this(paValue, paContent);
        isSelect = paIsSelect;
    }

    public void setSelected(boolean paSelected)
    {
        isSelect = paSelected;
    }

    public boolean isSelected()
    {
        return isSelect;
    }

    public String getValue()
    {
        return strValue;
    }

    public String toString()
    {
        if(isSelect)
            return "<option value=\"" + strValue + "\" selected >" + strContent + "</option>";
        else
            return "<option value=\"" + strValue + "\">" + strContent + "</option>";
    }
}
